package day1;

public class Demo10 {
    public static void main(String[] args) {
        //上半部分
        for (int i = 1; i < 5; i++) {
            for (int j = 1; j <=4-i; j++) {
                System.out.print(" ");
            }
            for (int j = 1; j < i*2; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
        //下半部分
        for (int i = 3; i >0; i--) {
            for (int j = 1; j <=4-i; j++) {
                System.out.print(" ");
            }
            for (int j = 1; j < i*2; j++) {
                System.out.print("*");
            }
            System.out.println();
        }

    }
}
